package com.wltt.healing.healingusercommon.executors;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

/**
 * @Author: wltt
 * @Date: 2021/9/8 15:26：
 * @Version: 1.0
 * @Description: TODO
 */
public class DemoExecutor implements Runnable {

    private static final Logger logger = LogManager.getLogger(DemoExecutor.class);

    /**
     * 当前任务名称
     */
    private String myName;

    public DemoExecutor(String myName) {
        this.myName = myName;
    }

    @Override
    public void run() {
        System.out.println("我是" + myName);
    }


    /**
     * 使用示例
     */
    public static void main(String[] args) {
        DemoExecutor demoExecutor = new DemoExecutor("demo");
        WorkStealingPool.execute(demoExecutor);
    }
}
